﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PACKETPARSERMAX20.CORE
{
    public class SpellStart
    {
        public DefinitionBase definition;
        public SpellStart(DefinitionBase pDefinition)
        {

            definition = pDefinition;
            //definition.InitLog();
        }

        private UInt64 _castitem_or_caster;
        public UInt64 castitem_or_caster
        {
            get
            {
                return _castitem_or_caster;
            }
            set
            {
                _castitem_or_caster = value;
              //  if (definition.LogIt) definition.LogAppendLine("UInt64", "castitem_or_caster", _castitem_or_caster, true);
            }
        }

        private UInt64 _caster;
        public UInt64 caster
        {
            get
            {
                return _caster;
            }
            set
            {
                _caster = value;
              //  if (definition.LogIt) definition.LogAppendLine("UInt64", "caster", _caster, true);
            }
        }

        private SpellCastFlags _castflags;
        public SpellCastFlags castflags
        {
            get
            {
                return _castflags;
            }
            set
            {
                _castflags = value;
              //  if (definition.LogIt) definition.LogAppendLine("UInt32", "castFlags", (UInt32)_castflags, "", _castflags.DumpFlags());
            }
        }

        private byte _cast_count;
        public byte cast_count
        {
            get
            {
                return _cast_count;
            }
            set
            {
                _cast_count = value;
              //  if (definition.LogIt) definition.LogAppendLine("Byte", "cast_count", _cast_count);
            }
        }

        private UInt32 _spellInfoId;
        public UInt32 spellInfoId
        {
            get
            {
                return _spellInfoId;
            }
            set
            {
                _spellInfoId = value;
              //  if (definition.LogIt) definition.LogAppendLine("UInt32", "spellInfoId", _spellInfoId);
            }
        }

        private UInt32 _getMSTime;
        public UInt32 getMSTime
        {
            get
            {
                return _getMSTime;
            }
            set
            {
                _getMSTime = value;
              //  if (definition.LogIt) definition.LogAppendLine("UInt32", "getMSTime", _getMSTime);
            }
        }


        private SpellCastTargetFlags _targetMask;
        public SpellCastTargetFlags targetMask
        {
            get
            {
                return _targetMask;
            }
            set
            {
                _targetMask = value;
              //  if (definition.LogIt) definition.LogAppendLine("UInt32", "targetMask", (UInt32)_targetMask, "", _targetMask.DumpFlags());
            }
        }

        private ulong _unitTarget;
        public ulong unitTarget
        {
            get
            {
                return _unitTarget;
            }
            set
            {
                _unitTarget = value;
              //  if (definition.LogIt) definition.LogAppendLine("PackedGuid", "unitTarget", _unitTarget, "TARGET_FLAG_UNIT", true);
            }
        }

        private ulong _GOTarget;
        public ulong GOTarget
        {
            get
            {
                return _GOTarget;
            }
            set
            {
                _GOTarget = value;
              //  if (definition.LogIt) definition.LogAppendLine("PackedGuid", "GOTarget", _GOTarget, "TARGET_FLAG_OBJECT | TARGET_FLAG_OBJECT_UNK", true);
            }
        }

        private ulong _CorpseTarget;
        public ulong CorpseTarget
        {
            get
            {
                return _CorpseTarget;
            }
            set
            {
                _CorpseTarget = value;
              //  if (definition.LogIt) definition.LogAppendLine("PackedGuid", "corpseTarget", _CorpseTarget, "TARGET_FLAG_CORPSE | TARGET_FLAG_PVP_CORPSE", true);
            }
        }

        private ulong _otherTarget;
        public ulong otherTarget
        {
            get
            {
                return _otherTarget;
            }
            set
            {
                _otherTarget = value;
              //  if (definition.LogIt) definition.LogAppendLine("PackedGuid", "otherTarget", _otherTarget, true);
            }
        }
        private ulong _itemTarget;
        public ulong itemTarget
        {
            get
            {
                return _itemTarget;
            }
            set
            {
                _itemTarget = value;
              //  if (definition.LogIt) definition.LogAppendLine("PackedGuid", "itemTarget", _itemTarget, "TARGET_FLAG_ITEM | TARGET_FLAG_TRADE_ITEM", true);
            }
        }
        private float _srcX;
        public float srcX
        {
            get
            {
                return _srcX;
            }
            set
            {
                _srcX = value;
              //  if (definition.LogIt) definition.LogAppendLine("float", "srcX", _srcX, "TARGET_FLAG_SOURCE_LOCATION");
            }
        }

        private float _srcY;
        public float srcY
        {
            get
            {
                return _srcY;
            }
            set
            {
                _srcY = value;
              //  if (definition.LogIt) definition.LogAppendLine("float", "srcY", _srcY, "TARGET_FLAG_SOURCE_LOCATION");
            }
        }
        private float _srcZ;
        public float srcZ
        {
            get
            {
                return _srcZ;
            }
            set
            {
                _srcZ = value;
              //  if (definition.LogIt) definition.LogAppendLine("float", "srcZ", _srcZ, "TARGET_FLAG_SOURCE_LOCATION");
            }
        }



        private float _destX;
        public float destX
        {
            get
            {
                return _destX;
            }
            set
            {
                _destX = value;
              //  if (definition.LogIt) definition.LogAppendLine("float", "destX", _destX, _unkdestbyte, "TARGET_FLAG_DEST_LOCATION");
            }
        }

        private float _destY;
        public float destY
        {
            get
            {
                return _destY;
            }
            set
            {
                _destY = value;
              //  if (definition.LogIt) definition.LogAppendLine("float", "destY", _destY, _unkdestbyte, "TARGET_FLAG_DEST_LOCATION");
            }
        }
        private float _destZ;
        public float destZ
        {
            get
            {
                return _destZ;
            }
            set
            {
                _destZ = value;
              //  if (definition.LogIt) definition.LogAppendLine("float", "destZ", _destZ, _unkdestbyte, "TARGET_FLAG_DEST_LOCATION");
            }
        }

        private string _strTarget;
        public string strTarget
        {
            get
            {
                return _strTarget;
            }
            set
            {
                _strTarget = value;
              //  if (definition.LogIt) definition.LogAppendLine("string", "strTarget", _strTarget, "TARGET_FLAG_STRING");
            }
        }

        private UInt32 _ammoDisplayID;
        public UInt32 ammoDisplayID
        {
            get
            {
                return _ammoDisplayID;
            }
            set
            {
                _ammoDisplayID = value;
              //  if (definition.LogIt) definition.LogAppendLine("UInt32", "ammoDisplayID", _ammoDisplayID, "CAST_FLAG_AMMO");
            }
        }


        private UInt32 _ammoInventoryType;
        public UInt32 ammoInventoryType
        {
            get
            {
                return _ammoInventoryType;
            }
            set
            {
                _ammoInventoryType = value;
              //  if (definition.LogIt) definition.LogAppendLine("UInt32", "ammoInventoryType", _ammoInventoryType, "CAST_FLAG_AMMO");
            }
        }



        private byte _unksrcbyte;
        public byte unksrcbyte
        {
            get
            {
                return _unksrcbyte;
            }
            set
            {
                _unksrcbyte = value;
              //  if (definition.LogIt) definition.LogAppendLine("Byte", "unksrcbyte", _unksrcbyte, "TARGET_FLAG_SOURCE_LOCATION");
            }
        }


        private byte _unkdestbyte;
        public byte unkdestbyte
        {
            get
            {
                return _unkdestbyte;
            }
            set
            {
                _unkdestbyte = value;
              //  if (definition.LogIt) definition.LogAppendLine("Byte", "unkdestbyte", _unkdestbyte, "TARGET_FLAG_DEST_LOCATION");
            }
        }

        private UInt32 _predicted_power;
        public UInt32 predicted_power
        {
            get
            {
                return _predicted_power;
            }
            set
            {
                _predicted_power = value;
              //  if (definition.LogIt) definition.LogAppendLine("UInt32", "predicted_power", _predicted_power, "CAST_FLAG_UNKNOWN6");
            }
        }

        private byte _runes_state_before;
        public byte runes_state_before
        {
            get
            {
                return _runes_state_before;
            }
            set
            {
                _runes_state_before = value;
              //  if (definition.LogIt) definition.LogAppendLine("Byte", "runes_state_before", _runes_state_before, "CAST_FLAG_UNKNOWN7");
            }
        }

        private byte _runes_state_after;
        public byte runes_state_after
        {
            get
            {
                return _runes_state_after;
            }
            set
            {
                _runes_state_after = value;
              //  if (definition.LogIt) definition.LogAppendLine("Byte", "runes_state_after", _runes_state_after, "CAST_FLAG_UNKNOWN7");
            }
        }

        private SortedList<int, byte> _runes_state_unk_list;
        public SortedList<int, byte> runes_state_unk_list
        {
            get
            {
                return _runes_state_unk_list;
            }
            set
            {
                _runes_state_unk_list = value;
            }

        }

        public void Add_runes_state_unk(int i, byte prunes_state_unk)
        {
            if (_runes_state_unk_list == null) _runes_state_unk_list = new SortedList<int, byte>();
            _runes_state_unk_list.Add(i, prunes_state_unk);
          //  if (definition.LogIt) definition.LogAppendLine("byte", "runes_state_unk", prunes_state_unk, i, "CAST_FLAG_UNKNOWN7");
        }






        private uint _CAST_FLAG_UNKNOWN21_uint_1;
        public uint CAST_FLAG_UNKNOWN21_uint_1
        {
            get
            {
                return _CAST_FLAG_UNKNOWN21_uint_1;
            }
            set
            {
                _CAST_FLAG_UNKNOWN21_uint_1 = value;
              //  if (definition.LogIt) definition.LogAppendLine("UInt32", "CAST_FLAG_UNKNOWN21_uint_1", _CAST_FLAG_UNKNOWN21_uint_1, "CAST_FLAG_UNKNOWN21");
            }
        }

        private uint _CAST_FLAG_UNKNOWN21_uint_2;
        public uint CAST_FLAG_UNKNOWN21_uint_2
        {
            get
            {
                return _CAST_FLAG_UNKNOWN21_uint_2;
            }
            set
            {
                _CAST_FLAG_UNKNOWN21_uint_2 = value;
              //  if (definition.LogIt) definition.LogAppendLine("UInt32", "CAST_FLAG_UNKNOWN21_uint_2", CAST_FLAG_UNKNOWN21_uint_2, "CAST_FLAG_UNKNOWN21");
            }
        }
    }
}
